<?php $this->load->module('index/index/head');?>
<?php $this->load->module('member/index/center_head',$extra);?>
<link rel="stylesheet" href="<?php echo URLPRE;?>static/template/bai/css/tuangou.css" />


    <!--container-->
    <div class="container">
    <div class="row">
    <div class="col-md-12">
        <div class="breadcrumb-box">
            <span class="breadcrumb-new-style">您所在的位置：</span>
            <ol class="breadcrumb ol-bgc">
                <li><a href="<?php echo site_url('member/index/center')?>">会员中心</a></li>
                <li class="active">订单详情</li>
            </ol>
        </div>
    </div>

    <?php $this->load->module('member/index/center_left',$extra);?>
        <div class="col-md-9 member-center-box-margin">

            <div class="hy_xinnei_rt_lietit">线路订单详情</div>
            <div class="hy_xinnei_rt_liecon">
                <div class="article">
                    <div class="section">
                        <div class="title"><strong>订单信息</strong></div>
                        <div class="zlf_table">
                            <table width="100%" class="table_form" style="margin-bottom:0">
                                <tr>
                                    <th width="100">订单编号： </th>
                                    <td>&nbsp;<?php echo $order_info['order_sn'];?></td>
                                </tr>
                                <tr>
                                    <th>下单时间： </th>
                                    <td>&nbsp;<font color="red"><?php echo $order_info['add_time'];?></font></td>
                                </tr>
                                <tr>
                                    <th>订单总价： </th>
                                    <td>&nbsp;<font><?php echo price_format($order_info['order_account']);?></font></td>
                                </tr>
                                <tr>
                                    <th>已支付金额： </th>
                                    <td>&nbsp;<font><?php echo price_format($order_info['paid_account']);?></font></td>
                                </tr>
                                <tr>
                                    <th>未支付金额： </th>
                                    <td>&nbsp;<font color="red"><?php echo price_format($order_info['order_account']-$order_info['paid_account']);?></font></td>
                                </tr>
                                <tr>
                                    <th>订单备注： </th>
                                    <td>&nbsp;<?php echo $order_info['order_note'] ;?></td>
                                </tr>
                                <tr class="zlf_border_none">
                                    <th>订单状态： </th>
                                    <td>&nbsp;
                                        <?php if($order_info['pay_status']==3&&$order_info['order_status']==4):?>&nbsp;<font style="color:green;">订单完成</font><?php endif;?>
                                        <?php if($order_info['order_status']==3):?>&nbsp;已关闭订单<?php endif;?>
                                        <?php if($order_info['pay_status']!=3&&$order_info['order_status']!=3):?>
                                            &nbsp;<a href="<?php echo site_url('pay/'.$order_info['order_id']);?>" style="color:green">立即付款</a>
                                        <?php endif;?>
                                        <?php if($order_info['order_status']!=3&&$order_info['pay_status']==1):?>
                                            &nbsp;<a href="javascript:;" style="color:red" data-uri="<?php echo $ajax_order_status_url;?>" id="cancelOrderBtn">取消订单</a>
                                        <?php endif;?>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                    <div class="bk10"></div>
                    <div class="section">
                        <div class="title"><strong>线路信息</strong></div>
                        <div class="zlf_table">
                            <table width="100%" class="table_form" style="margin-bottom:0">
                                <tr>
                                    <th width="100">线路名称： </th>
                                    <td>&nbsp;<a href="<?php echo site_url('xianlu/'.$go_date_info['line_id'].'.html');?>" target="_blank"> <?php echo $go_date_info['line_name'];?></a></td>
                                </tr>
                                <tr>
                                    <th>线路编号： </th>
                                    <td>&nbsp;<font><?php echo $go_date_info['line_number'];?></font></td>
                                </tr>
                                <tr>
                                    <th>发团日期： </th>
                                    <td>&nbsp;<font><?php echo $go_date_info['go_date'];?></font></td>
                                </tr>
                            </table>
                        </div>
                    </div>
                    <div class="bk10"></div>
                    <div class="section">
                        <div class="title"><strong>价格清单</strong></div>
                        <div class="zlf_table">
                            <table style="table-layout:fixed;margin-bottom:0;">
                                <thead>
                                <tr>
                                    <th class="algin_l">价格类型</th>
                                    <th class="algin_c">单价(元/人)</th>
                                    <th class="algin_c">人数</th>
                                    <th class="algin_c">小计(元)</th>
                                </tr>
                                </thead>
                                <?php if(isset($price_list)&&!empty($price_list)):?>
                                    <?php foreach($price_list as $val):?>
                                        <tr>
                                            <td class="algin_l"><?php echo $val['price_name'];?></td>
                                            <td class="algin_c zlf_price"><?php echo price_format($val['price']);?></td>
                                            <td class="algin_c"><?php echo $val['num'];?></td>
                                            <td class="algin_c zlf_price"><?php echo price_format($val['num']*$val['price']);?></td>
                                        </tr>
                                    <?php endforeach;?>
                                <?php endif;?>
                            </table>
                        </div>
                    </div>
                    <?php if(isset($tourist_info)&&!empty($tourist_info)):?>
                        <div class="bk10"></div>
                        <div class="section">
                            <div class="title"><strong>游客信息</strong></div>
                            <div class="zlf_table">
                                <table style="table-layout:fixed;margin-bottom:0;">
                                    <thead>
                                    <tr>
                                        <th class="algin_l">游客姓名</th>
                                        <th class="algin_l">证件类型</th>
                                        <th class="algin_l">证件号码</th>
                                        <th class="algin_c">游客手机号码</th>
                                    </tr>
                                    </thead>
                                    <?php foreach($tourist_info as $val):?>
                                        <tr>
                                            <td class="algin_l"><?php echo $val['name'];?></td>
                                            <td class="algin_l">
                                                <?php if($val['id_card_type']==1):?>身份证<?php endif;?>
                                                <?php if($val['id_card_type']==2):?>护照<?php endif;?>
                                                <?php if($val['id_card_type']==3):?>军官证<?php endif;?>
                                            </td>
                                            <td class="algin_l"><?php echo $val['id_number'];?></td>
                                            <td class="algin_c"><?php echo $val['phone_num'];?></td>
                                        </tr>
                                    <?php endforeach;?>
                                </table>
                            </div>
                        </div>
                    <?php endif;?>
                    <div class="bk10"></div>
                    <div class="section">
                        <div class="title"><strong>联系人信息</strong></div>
                        <div class="zlf_table">
                            <table width="100%" class="table_form" style="margin-bottom:0">
                                <tr>
                                    <th width="100">姓名： </th>
                                    <td>&nbsp;<?php echo $contact_info['name'];?></td>
                                </tr>
                                <?php if(isset($contact_info['phone_num'])&&!empty($contact_info['phone_num'])):?>
                                    <tr>
                                        <th>手机号码： </th>
                                        <td>&nbsp;<?php echo $contact_info['phone_num'];?></td>
                                    </tr>
                                <?php endif;?>
                                <?php if(isset($contact_info['email'])&&!empty($contact_info['email'])):?>
                                    <tr>
                                        <th>邮件地址： </th>
                                        <td>&nbsp;<?php echo $contact_info['email'];?></td>
                                    </tr>
                                <?php endif;?>
                            </table>
                        </div>
                    </div>
                </div>
            </div>

        </div>


    </div>
    </div>

<script type="text/javascript">
    $(function(){
        //取消订单
        $('#cancelOrderBtn').click(function(){
            var uri = $(this).attr("data-uri");
            var that = this;
            $.dialog.confirm("<font color='red'><b>你确认要取消该订单么?</b></font>", function () {
                $.ajax({
                    url:uri,
                    cache:false,
                    dataType:'json',
                    type:'POST',
                    data:{},
                    success:function(msgObj){
                        if(msgObj.status==1){
                            $.dialog.tips(msgObj.info);
                            if(msgObj.url){
                                window.location.href = msgObj.url;
                            }
                        }else{
                            $.dialog.alert(msgObj.info);
                        }
                        return false;
                    }
                });
            }, function () {
            });
        })
    })
</script>
<?php $this->load->module('index/index/foot');?>